Repository navigation
Share links for long projects (#project= beyond GitHub Pages' limit) - #14
Merged
Merged
Conversation
GitHub Pages answers 414 when a request's path and query exceed 8192 characters, so a share link of a long project didn't open. Such a link now carries the project as #project=... (never sent to the server); the IDE reads it from either place. Links that fit keep ?project=. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepares P17 («In IDE öffnen» in the LiaScript macro), which builds IDE links in this format. Merge this first.
Problem. GitHub Pages answers
414 URI Too Longwhen a request's path and query exceed 8192 characters (measured against glpython-edu.github.io; 8192 works, 8193 doesn't). A share link carries the whole project in?project=, so a long project's link didn't open at all. With realistic code that is roughly 5,000–30,000 characters of program, depending on how well lz-string compresses it.Change (
src/projectShare.ts)buildShareUrlkeeps?project=while the link fits. Beyond the limit it puts the same encoded payload in the fragment,#project=…, which the browser never sends to the server.?project=links are unchanged.Tested with
npm run preview, each link opened in a fresh browser profile and run:?project=?project=#project=In each case the address bar is clean afterwards. Build and lint pass, with the same warnings as
main.🤖 Generated with Claude Code